package org.example.commonapi.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 课程_班级表
 * @TableName course_class
 */
@TableName(value ="course_class")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CourseClass implements Serializable {
    /**
     * 课程班级id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 课程id
     */
    private Long courseId;

    /**
     * 班级名称
     */
    private String className;

    /**
     * 班级人数
     */
    private Integer number;

    /**
     * 班级邀请码
     */
    private String invite;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 构造函数
     */
    public CourseClass(Long courseId,String className){
        this.className=className;
        this.courseId=courseId;
    }

    public CourseClass(Long courseId,Integer number){
        this.number=number;
        this.courseId=courseId;
    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}